public class Book {
    private int bookid;
    private String title;
    private String author;
    private boolean isBorrowed=false; //true 已借出  false 未借出

    public Book(int bookid,String title,String author,boolean isBorrowed){
        this.bookid=bookid;
        this.title=title;
        this.author=author;
        this.isBorrowed=isBorrowed;
    }

    public int getBookid() {
        return bookid;
    }

    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    public boolean getIsBorrowed() {
        return isBorrowed;
    }

    public void setBookid(int bookid) {
        this.bookid = bookid;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public void setIsBorrowed(boolean isBorrowed) {
        this.isBorrowed = isBorrowed;
    }

    public void borrow(){
        this.isBorrowed=true;
    }
    public void returnBook(){
        this.isBorrowed=false;
    }
}
